﻿<%@ Page Title="Account Management" Language="C#" MasterPageFile="~/Bundled.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Bundled.Pages.Account.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Account Management</h2>
    <div class="container">
        <table class="wide30 floatLeft">
            <tr>
                <td><a id="aAccount" href="javascript:void(0)">Account Information</a></td>
            </tr>
            <tr>
                <td><a id="aBillingShipping" href="javascript:void(0)">Billing/ Shipping Information</a></td>
            </tr>
        </table>

        <div id="divAccount" class="divAccount">
            <table>
                <tr>
                    <td colspan="2">
                        <h3>Update Personal Information</h3>
                    </td>
                </tr>
                <tr>
                    <td>First Name:</td>
                    <td>
                        <asp:TextBox ID="txtFName" runat="server"></asp:TextBox>&nbsp;<span class="required">(required)</span></td>
                    <td>
                        <asp:RequiredFieldValidator ID="rfvFName" runat="server" ControlToValidate="txtFName"
                            ErrorMessage="* Please enter your First Name" Display="Dynamic" ValidationGroup="Personal" CssClass="validation"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td>Last Name:</td>
                    <td>
                        <asp:TextBox ID="txtLName" runat="server"></asp:TextBox>&nbsp;<span class="required">(required)</span></td>
                    <td>
                        <asp:RequiredFieldValidator ID="rfvLName" runat="server" ControlToValidate="txtLName"
                            ErrorMessage="* Please enter your Last Name" Display="Dynamic" ValidationGroup="Personal" CssClass="validation"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td>Email Address:</td>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>&nbsp;<span class="required">(required)</span></td>
                    <td>
                        <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmail"
                            ErrorMessage="* Please enter your Email Address" Display="Dynamic" ValidationGroup="Personal" CssClass="validation"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnPersonalSave" runat="server" ValidationGroup="Personal" OnClick="btnPersonalSave_Click" Text="Save" CssClass="button" UseSubmitBehavior="true" /></td>
                </tr>
            </table>
            <table>
                <tr>
                    <td colspan="2">
                        <h3>Update Password</h3>
                    </td>
                </tr>
                <tr>
                    <td>Old Password:</td>
                    <td>
                        <asp:TextBox ID="txtOldPW" runat="server" TextMode="Password"></asp:TextBox>&nbsp;<span class="required">(required)</span></td>
                    <td>
                        <asp:RequiredFieldValidator ID="rfvOldPW" runat="server" ControlToValidate="txtOldPW"
                            ErrorMessage="* Please enter your Old Password" Display="Dynamic" ValidationGroup="Password" CssClass="validation"></asp:RequiredFieldValidator></td>
                    <td>
                        <asp:CustomValidator ID="cvOldPW" runat="server" ControlToValidate="txtOldPW" ErrorMessage="* Password does not match"
                            Display="Dynamic" ValidationGroup="Password" CssClass="validation" OnServerValidate="cvOldPW_ServerValidate"></asp:CustomValidator></td>
                </tr>
                <tr>
                    <td>New Password:</td>
                    <td>
                        <asp:TextBox ID="txtNewPW" runat="server" TextMode="Password"></asp:TextBox>&nbsp;<span class="required">(required)</span></td>
                    <td>
                        <asp:RequiredFieldValidator ID="rfvNewPW" runat="server" ControlToValidate="txtNewPW"
                            ErrorMessage="* Please enter your New Password" Display="Dynamic" ValidationGroup="Password" CssClass="validation"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnPasswordSave" runat="server" ValidationGroup="Password" OnClick="btnPasswordSave_Click" Text="Save" CssClass="button" /></td>
                </tr>
            </table>
        </div>
        <div id="divBillingShipping" class="divAccount">
            <asp:ValidationSummary ID="vsBilling" runat="server" ValidationGroup="Billing" CssClass="validation" />
            <asp:ValidationSummary ID="vsShipping" runat="server" ValidationGroup="Shipping" CssClass="validation" />
            <table>
                <tr>
                    <td>
                        <h3>Shipping Information</h3>
                    </td>
                </tr>
                <tr>
                    <td>
                        First:&nbsp;
                        <asp:TextBox ID="txtbxShipFirst" runat="server"></asp:TextBox>
                         <asp:RequiredFieldValidator ID="rfvShipFirst" runat="server" ControlToValidate="txtbxShipFirst"
                            ErrorMessage="Please enter your First Name" ValidationGroup="Shipping" CssClass="validation">*</asp:RequiredFieldValidator>
                        Last:&nbsp;
                        <asp:TextBox ID="txtbxShipLast" runat="server"></asp:TextBox>                    
                        <asp:RequiredFieldValidator ID="rfvShipLast" runat="server" ControlToValidate="txtbxShipLast"
                            ErrorMessage="Please enter your Last Name" ValidationGroup="Shipping" CssClass="validation">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        Address 1:&nbsp;
                        <asp:TextBox ID="txtbxShipAdd1" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShipAdd1" runat="server" ControlToValidate="txtbxShipAdd1"
                            ErrorMessage="Please enter your Address" ValidationGroup="Shipping" CssClass="validation">*</asp:RequiredFieldValidator>
                         Address 2:&nbsp;
                        <asp:TextBox ID="txtbxShipAdd2" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        City:&nbsp;
                        <asp:TextBox ID="txtShipCity" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvShipCity" runat="server" ControlToValidate="txtShipCity"
                            ErrorMessage="Please enter your City" ValidationGroup="Shipping" CssClass="validation">*</asp:RequiredFieldValidator>
                        State:&nbsp;
                        <asp:DropDownList ID="ddlShipState" runat="server"></asp:DropDownList>
                        Zip:&nbsp;
                        <asp:TextBox ID="txtbxShipZip" runat="server" Width="100"></asp:TextBox>                
                        <asp:RequiredFieldValidator ID="rfvShipZip" runat="server" ControlToValidate="txtbxShipZip"
                            ErrorMessage="Please enter your Zip Code" ValidationGroup="Shipping" CssClass="validation">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td><asp:Button ID="btnShippingSave" runat="server" CssClass="button" OnClick="btnShippingSave_Click" Text="Save" ValidationGroup="Shipping" /></td>
                </tr>
                <tr>
                    <td>
                        <h3>Billing Information</h3>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:CheckBox ID="chkbxShip" runat="server" Text="Same as Shipping" OnCheckedChanged="chkbxShip_CheckedChanged" AutoPostBack="true" />
                    </td>

                </tr>
                <tr>
                    <td>
                        First:&nbsp;
                        <asp:TextBox ID="txtbxBillFirst" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvBillFirst" runat="server" ControlToValidate="txtbxBillFirst"
                            ErrorMessage="Please enter your First Name" ValidationGroup="Billing" CssClass="validation">*</asp:RequiredFieldValidator>
                        Last:&nbsp;
                        <asp:TextBox ID="txtbxBillLast" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvBillLast" runat="server" ControlToValidate="txtbxBillLast"
                            ErrorMessage="Please enter your Last Name" ValidationGroup="Billing" CssClass="validation">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        Address 1:&nbsp;
                        <asp:TextBox ID="txtbxBillAdd1" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvBillAdd1" runat="server" ControlToValidate="txtbxBillAdd1"
                            ErrorMessage="Please enter your Address" ValidationGroup="Billing" CssClass="validation">*</asp:RequiredFieldValidator>
                        Address 2:&nbsp;
                        <asp:TextBox ID="txtbxBillAdd2" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        City:&nbsp;
                        <asp:TextBox ID="txtBillCity" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvBillCity" runat="server" ControlToValidate="txtBillCity"
                            ErrorMessage="Please enter your City" ValidationGroup="Billing" CssClass="validation">*</asp:RequiredFieldValidator>
                        State:&nbsp;
                        <asp:DropDownList ID="ddlBillState" runat="server"></asp:DropDownList>
                        Zip:&nbsp;
                        <asp:TextBox ID="txtbxBillZip" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvBillZip" runat="server" ControlToValidate="txtbxBillZip"
                            ErrorMessage="Please enter your Zip Code" ValidationGroup="Billing" CssClass="validation">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td><asp:Button ID="btnBillingSave" runat="server" CssClass="button" OnClick="btnBillingSave_Click" Text="Save" ValidationGroup="Billing" /></td>
                </tr>
            </table>
        </div>
        <input type="hidden" id="hfDisplay" runat="server" />
    </div>  
</asp:Content>
